{% import 'macros/form.twig' as form %}
{% import 'macros/table.twig' as table %}
{% import 'macros/misc.twig' as misc %}

<div style="position:relative;">
    <form action="{{ action }}" method="post" enctype="multipart/form-data">

        {% if accounts is defined %}
            {{ misc.Section(constant('Strings::LABEL_0016'), 'td_data_bold user') }}
            <table width="100%" cellpadding="0" cellspacing="3">
                {{ form.Fields(accounts, 'user', true, true) }}
            </table>
        {% else %}
            {% set property = 'client_account_creation' %}
            {{ form.HiddenFor(property, hidden[property]) }}
        {% endif %}

        <br>
        {{ misc.Section(constant('Strings::LABEL_0222'), 'td_data_bold user') }}
        <div style="padding:8px;">
            {# 2097152 = 2MB #}
            <input type="file" id="fileToImport" name="fileToImport" size="2097152" required="1">
        </div>

        <div style="margin-top:8px;padding:8px;border-top:1px solid #CCCCCC;">
            <button type="submit" onclick="/*load_img();*/">{{ constant('Strings::LABEL_0212') }}</button>
        </div>
    </form>

    <form name="{{ Export.name }}" action="{{ Export.action }}" method="post" style="position:absolute;right:0;bottom:0;">
        {% for item in Export.hidden | keys %}
            {{ form.HiddenFor(item, Export.hidden[item]) }}
        {% endfor %}
        <div style="margin-top:8px;padding:8px;">
            <button type="submit" onclick="/*load_img();*/">{{ constant('Strings::LABEL_0201') }}</button>
        </div>
    </form>

    {% if report %}
        <br>
        {{ misc.Section(constant('Strings::LABEL_0221'), 'td_data_bold user') }}
        <div id="report">
            <ul>
                {% for item in report %}
                    {{ item | raw }}
                {% endfor %}
            </ul>
        </div>
    {% endif %}


</div>